function fv=stnd4(y,w)
%******************************************************************
%** This is a supporting function for "sampling2.m"              **
%** Created by XXXXXXXXXXX, Dec 19, 2011                         **
%** y:dependent variable                                         **
%** w:the weight for the random part, varying from 0 to 1        **
%** output:data drawn with the designed treatment                **
%******************************************************************
format long; 
n=size(y,1);
logity=log(y./(1-y));    
x0=ones(n,1);
x1=rand(n,1); 
x2=rand(n,1)*w+(1-w)*logity; 
total=[y x0 x1 x2];
fv=total;
